<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/struct_info.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/submitter.js"></script>
<script src="${staticServer}/inc/js/infopad.js?2.2"></script>

<link rel="stylesheet" href="${staticServer}/css/consultant_client.css" />
	
<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<script src="${staticServer}/inc/js/datepicker.js"></script>

<style>
#SWFUpload_0{
	margin-top: 70px;
    margin-left: -30px;
}
</style>
<script>


var add_Period = function(){
	var tg_rent = $("#tg_rent").val();
	var monthmoney = $("#monthmoney").val();
	var contracttime = $("#contracttime").val();
	var maturityfollowup = $("#maturityfollowup").val();
	var otherexpenses=$("#otherexpenses").val();
	var propertyfeeholder=$("#propertyfeeholder").val();
	var otherconventions = $("#otherconventions").val();
	if(contracttime==""){
		infopad.err("请输入签约时间");
		return;
	}
	
	$.post("${contextPath}/rent/rentAddDetail.json", {
		    "tg_rent":tg_rent,
			"monthmoney":monthmoney,
			"contracttime":contracttime,
			"maturityfollowup":maturityfollowup,
			"propertyfeeholder":propertyfeeholder,
			"otherconventions":otherconventions,
			"otherexpenses":otherexpenses
		}, function(ms) {
		   var msg = ms.msg;
		   if(msg!=null && msg=="1"){
			   infopad.msg("操作成功！");
			   window.location.href="${contextPath}/rent/rentInforList.htm";
		   }else if(msg!=null && msg=="2"){
		       infopad.err("不在操作时间，请在每月的15到20之间添加");
		   }else if(msg!=null && msg=="3"){
		       infopad.msg("本月已经添加过，请去修改");
		   }
			
	});
}



</script>
</head>
<input type="hidden" id="tg_rent" value="<#if rentDetail??>${rentDetail.tg_rent}</#if>">
<body>
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>组织架构</li>
			<li>&gt;</li>
			<li class="current">title</li>
		</ul>
	</div>

	<div id="container">
		<div id="title">添加房租明细</div>
		<table id="infotable">
			
			<tr>
				<th>月费用和年费用:</th>
				<td>
					<input type="text" id="monthmoney" value="<#if rentDetail??>${rentDetail.monthmoney}</#if>">
				</td>
			</tr>
			<tr>
				<th>签约时间:</th>
				<td>
					<input type="text" id="contracttime" placeholder="签约时间" value="<#if rentDetail??>${rentDetail.contracttime}</#if>" rel="DATE::Y-m-d" value="" size="14" maxlength="15" readonly="readonly" class="DatePicker_Icon">
				</td>
			</tr>
			<tr>
				<th>到期后续情况：</th>
				<td>
					<input type="text" id="maturityfollowup"  value="<#if rentDetail??>${rentDetail.maturityfollowup}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
			
			
			<tr>
				<th>物业管理人以及管理费用：</th>
				<td>
					<input type="text" id="propertyfeeholder" value="<#if rentDetail??>${rentDetail.propertyfeeholder}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
			<tr>
				<th>其他费用：</th>
				<td>
					<input type="text" id="otherexpenses" value="<#if rentDetail??>${rentDetail.otherexpenses}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
			<tr>
				<th>其他约定：</th>
				<td>
					<input type="text" id="otherconventions" value="<#if rentDetail??>${rentDetail.otherconventions}</#if>" size="14" maxlength="15" >
				</td>
			</tr>
			
		</table>
		
		<div id="controlbar">
			<input type="button" class="submit" onclick="add_Period()" value="  保  存  " />
		</div>
	</div>
	
</body>
</html>